package com.qcby.llmtchstd.service.Impl;

import com.qcby.llmtchstd.dao.StudentExamDao;
import com.qcby.llmtchstd.entity.Exam;
import com.qcby.llmtchstd.entity.IfNotExam;
import com.qcby.llmtchstd.service.StudentExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentExamServiceImpl implements StudentExamService {
    @Autowired
    private StudentExamDao studentExamDao;

    @Override
    public List<Exam> selectAll() {
        return studentExamDao.selectAll();
    }

    @Override
    public Exam selectOne(int id) {
        return studentExamDao.selectOne(id);
    }

    @Override
    public int save(String answer, int examId, int studentId,int score) {
        return studentExamDao.save(answer,examId,studentId,score);
    }

    @Override
    public IfNotExam ifNot(int examId, int studentId) {
        return studentExamDao.ifNot(examId,studentId);
    }

    @Override
    public int insertOne(int examId, int studentId) {
        return studentExamDao.insertOne(examId,studentId);
    }

    @Override
    public List<Exam> selectStudent(int id) {
        return studentExamDao.selectStudent(id);
    }

}
